<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<shield:permssion type="button">
<div class="show-info">
	<form action="${ctxPathA}/oa/booksmanage/borrowrecord/addOrUpd" method="post" autocomplete="off">
	    <input id="bookid" name="bookid" type="hidden" maxlength="100" value="${bid }"/>
	    <table class="tab-show">
	    	<colgroup>
	    		<col width="20%">
	    		<col width="">
	    	</colgroup>
	    	<caption>添加借阅记录</caption>
	        <tr>
		    	<th>
	            	<label><font color="red">*</font>借阅人：</label>
	        	</th>
	         	<!-- autocompleteTips提示，data-event表示触发事件，默认为keyup，data-tips-url为调取地址 ,value-to表示对于返回值中的属性-->
	         	<td><input type="text" name="borrowerName" value="${sessionScope.session_user.userName }" value-to="userName" class="autocompleteTips" 
	         	 data-tips-url="${ctxPathA}/system/common/getUsers">
	         	 <input name="borrowerId" type="hidden" value="${sessionScope.session_user.id }" value-to="userId"></td>
			</tr>
			<tr>
		    	<th>
	            	<label><font color="red">*</font>借阅日期：</label>
	        	</th>
	        	<!-- init="nowDate" 初始化为当前日期 -->
	         	<td><input type="text" name="borrowTime" value="${model.borrowTime}" class="Wdate" init="nowDate"/>&nbsp;至&nbsp;<input 
	         	type="text" name="returnTime" value="${model.returnTime}" class="Wdate ignore"/></td><!-- ignore忽略非空验证 -->
			</tr>
	    </table>
	    <div class="taCenter">
			<input class="button" type="submit" value="提交"/>
	    	<input class="button default" type="reset" value="重置"/>
	    </div>
	</form>
	<!-- t改为shieldTarget，且为jQuery选择器形式，autoSubmitForm_plugin表示自动提交表单 -->
    <form action="${ctxPathA }/oa/booksmanage/borrowrecord/search" method="post" class="searchForm autoSubmitForm_plugin" shieldTarget="#searchResultInner" successDo="shieldDonothing">
    	<input id="bookid" name="bid" type="hidden" value="${bid }"/>
    	<div id="searchResultInner">
    	</div>
    </form>
</div>
</shield:permssion>